home *** CD-ROM | disk | FTP | other *** search
/ Giga Games 1 / Giga Games.iso / net / usenet / volume7 / nethack3 / patch1b < prev    next >
Encoding:
Internet Message Format  |  1989-08-08  |  49.5 KB

  1. Path: uunet!zephyr.ens.tek.com!tekgen!tekred!saab!billr
  2. From: billr@saab.CNA.TEK.COM (Bill Randle)
  3. Newsgroups: comp.sources.games
  4. Subject: v07i095:  NetHack3 -  display oriented dungeons & dragons (Ver. 3.0), Patch1b
  5. Message-ID: <4389@tekred.CNA.TEK.COM>
  6. Date: 3 Aug 89 16:57:06 GMT
  7. Sender: nobody@tekred.CNA.TEK.COM
  8. Lines: 1860
  9. Approved: billr@saab.CNA.TEK.COM
  10.  
  11. Submitted-by: Izchak Miller <izchak@linc.cis.upenn.edu>
  12. Posting-number: Volume 7, Issue 95
  13. Archive-name: NetHack3/Patch1b
  14. Patch-To: NetHack3: Volume 7, Issue 56-93
  15.  
  16.  
  17.  
  18. #! /bin/sh
  19. # This is a shell archive.  Remove anything before this line, then unpack
  20. # it by saving it into a file and typing "sh file".  To overwrite existing
  21. # files, type "sh file -c".  You can also feed this as standard input via
  22. # unshar, or by typing "sh <file", e.g..  If this archive is complete, you
  23. # will see the following message at the end:
  24. #        "End of archive 2 (of 6)."
  25. # Contents:  misc.diff
  26. # Wrapped by billr@saab on Thu Aug  3 09:56:52 1989
  27. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  28. if test -f 'misc.diff' -a "${1}" != "-c" ; then 
  29.   echo shar: Will not clobber existing file \"'misc.diff'\"
  30. else
  31. echo shar: Extracting \"'misc.diff'\" \(47044 characters\)
  32. sed "s/^X//" >'misc.diff' <<'END_OF_FILE'
  33. XThis is the bundled patches for everything except src.  
  34. X
  35. XThe order of diffs by directories: amiga, auxil, include, others.
  36. X
  37. XThe batches are easily separated by searching for 'dirname/', starting
  38. Xwith amiga (the top directory diffs have no directory prefix).
  39. X
  40. X-------------------------------------Cut-----------------------------------
  41. X*** amiga/Old/amidos.c    Mon Jul 31 13:12:19 1989
  42. X--- amiga/amidos.c    Mon Jul 31 09:55:52 1989
  43. X***************
  44. X*** 484,490 ****
  45. X          (void) strncpy(SAVEF, bufp, PATHLEN);
  46. X          append_slash(SAVEF);
  47. X      } else if (!strncmp(buf, "GRAPHICS", 4)) {
  48. X!         unsigned int translate[28];   /* MAXPCHARS */
  49. X          int  i;
  50. X  
  51. X          if ((i = sscanf(bufp,
  52. X--- 484,490 ----
  53. X          (void) strncpy(SAVEF, bufp, PATHLEN);
  54. X          append_slash(SAVEF);
  55. X      } else if (!strncmp(buf, "GRAPHICS", 4)) {
  56. X!         unsigned int translate[MAXPCHARS+1]; /* for safety */
  57. X          int  i;
  58. X  
  59. X          if ((i = sscanf(bufp,
  60. X*** auxil/Old/Guidebook.mn    Mon Jul 31 13:16:30 1989
  61. X--- auxil/Guidebook.mn    Sat Jul 29 19:09:48 1989
  62. X***************
  63. X*** 4,10 ****
  64. X  .ds vr "NetHack Version 3.0
  65. X  .ds f0 "\*(vr
  66. X  .ds f1
  67. X! .ds f2 "July 19, 1989
  68. X  .mt
  69. X  A Guide to the Mazes of Menace
  70. X  .au
  71. X--- 4,10 ----
  72. X  .ds vr "NetHack Version 3.0
  73. X  .ds f0 "\*(vr
  74. X  .ds f1
  75. X! .ds f2 "July 22, 1989
  76. X  .mt
  77. X  A Guide to the Mazes of Menace
  78. X  .au
  79. X***************
  80. X*** 44,50 ****
  81. X  them an advantage in arms and armor.
  82. X  .pg
  83. X  \fIHealers\fP are wise in medicine and the apothecary.  They know the
  84. X! herbs and simples that can restore vitality, ease pain, anestheticize,
  85. X  and neutralize
  86. X  poisons; and with their instruments, they can divine a being's state
  87. X  of health or sickness.  Their medical practice earns them quite reasonable
  88. X--- 44,50 ----
  89. X  them an advantage in arms and armor.
  90. X  .pg
  91. X  \fIHealers\fP are wise in medicine and the apothecary.  They know the
  92. X! herbs and simples that can restore vitality, ease pain, anesthetize,
  93. X  and neutralize
  94. X  poisons; and with their instruments, they can divine a being's state
  95. X  of health or sickness.  Their medical practice earns them quite reasonable
  96. X***************
  97. X*** 355,363 ****
  98. X  prefix:  move without picking up any objects.
  99. X  .lp M[yuhjklbn]
  100. X  prefix:  move far, no pickup.
  101. X! .lp "g[yuhjklbn] or <CONTROL->[yuhjklbn]
  102. X  prefix:  move until something interesting is found.
  103. X! .lp G[yuhjklbn]
  104. X  prefix:  same as `g', but forking of corridors is not considered interesting.
  105. X  .lp .
  106. X  rest, do nothing for one turn.
  107. X--- 355,363 ----
  108. X  prefix:  move without picking up any objects.
  109. X  .lp M[yuhjklbn]
  110. X  prefix:  move far, no pickup.
  111. X! .lp "g[yuhjklbn]
  112. X  prefix:  move until something interesting is found.
  113. X! .lp G[yuhjklbn] or <CONTROL->[yuhjklbn]
  114. X  prefix:  same as `g', but forking of corridors is not considered interesting.
  115. X  .lp .
  116. X  rest, do nothing for one turn.
  117. X***************
  118. X*** 734,740 ****
  119. X  .pg
  120. X  You can name one food item after something you like to eat with the
  121. X  .op fruit
  122. X! option.
  123. X  .pg
  124. X  The command to eat food is `e'.
  125. X  .hn 2
  126. X--- 734,740 ----
  127. X  .pg
  128. X  You can name one food item after something you like to eat with the
  129. X  .op fruit
  130. X! option, if your dungeon has it.
  131. X  .pg
  132. X  The command to eat food is `e'.
  133. X  .hn 2
  134. X***************
  135. X*** 836,846 ****
  136. X  .pg
  137. X  You may encounter chests or boxes in your travels.  These can be
  138. X  opened with the ``#loot'' extended command when they are on the floor,
  139. X! or with the `a' (apply) command when you are carrying one.  However,
  140. X! chests are often locked, and require you to either use a key to unlock
  141. X! it, a tool to pick the lock, or to break it open with brute force.
  142. X! Chests are unwieldy objects, and must be set down to be unlocked (by
  143. X! kicking them,
  144. X  using a key or lock picking tool with the `a' (apply) command, or
  145. X  by using a weapon to force the lock with the ``#force'' extended command).
  146. X  .pg
  147. X--- 836,844 ----
  148. X  .pg
  149. X  You may encounter chests or boxes in your travels.  These can be
  150. X  opened with the ``#loot'' extended command when they are on the floor,
  151. X! or with the `a' (apply) command when you are carrying one.
  152. X! Chests are unwieldy objects, and must be set down to be unlocked
  153. X! (which can be accomplished by kicking them,
  154. X  using a key or lock picking tool with the `a' (apply) command, or
  155. X  by using a weapon to force the lock with the ``#force'' extended command).
  156. X  .pg
  157. X***************
  158. X*** 1028,1034 ****
  159. X  .lp sortpack
  160. X  (default on) sort the pack contents by type when displaying inventory.
  161. X  .lp standout
  162. X! (default off) boldface objects, monsters, zaps, and ``\fB--More--\fP''.
  163. X  .lp time\ \ \ \ 
  164. X  (default off) show the elapsed game time in turns on bottom line.
  165. X  .lp tombstone
  166. X--- 1026,1032 ----
  167. X  .lp sortpack
  168. X  (default on) sort the pack contents by type when displaying inventory.
  169. X  .lp standout
  170. X! (default off) boldface monsters and ``\fB--More--\fP''.
  171. X  .lp time\ \ \ \ 
  172. X  (default off) show the elapsed game time in turns on bottom line.
  173. X  .lp tombstone
  174. X***************
  175. X*** 1068,1074 ****
  176. X  .pg
  177. X  NetHack is an intricate and difficult game.  Novices might falter
  178. X  in fear, aware of their ignorance of the means to survive.  Well, fear
  179. X! not.  Your dungeon may come equipped with an "explore" or "discovery"
  180. X  mode, that enables you to keep old save files and cheat death, at the
  181. X  paltry cost of not getting on the high score list.
  182. X  .pg
  183. X--- 1066,1072 ----
  184. X  .pg
  185. X  NetHack is an intricate and difficult game.  Novices might falter
  186. X  in fear, aware of their ignorance of the means to survive.  Well, fear
  187. X! not.  Your dungeon may come equipped with an ``explore'' or ``discovery''
  188. X  mode, that enables you to keep old save files and cheat death, at the
  189. X  paltry cost of not getting on the high score list.
  190. X  .pg
  191. X***************
  192. X*** 1102,1125 ****
  193. X  .ux
  194. X  machines to the Usenet.
  195. X  .pg
  196. X! \fBDon G. Kneller\fP ported Hack 1.0.3 to Microsoft C and MS-DOS,
  197. X! producing PC HACK, of which at least seven versions are recorded (from
  198. X! 1.01e and 1.03g up to 3.6).
  199. X  .pg
  200. X  \fBR. Black\fP ported PC HACK to Lattice C and the Atari 520/1040ST,
  201. X  producing ST Hack 1.03.
  202. X  .pg
  203. X  \fBMike Stephenson\fP merged these various versions back together,
  204. X! incorporating many of the added features, and produced NetHack 1.4.
  205. X! He later coordinated a cast of thousands throughout the Usenet in
  206. X! adding and debugging features, and released NetHack versions 2.2, 2.3,
  207. X! and 3.0.
  208. X  .pg
  209. X  \fBOlaf Siebert\fP ported NetHack 2.3 and 3.0 to the Amiga.
  210. X  .pg
  211. X! The following folks didn't actually re-write the game, or port it to
  212. X! a new machine, but have made significant contributions to the playability of
  213. X! the game:
  214. X  
  215. X  .sd
  216. X  .TS S
  217. X--- 1100,1126 ----
  218. X  .ux
  219. X  machines to the Usenet.
  220. X  .pg
  221. X! \fBDon G. Kneller\fP ported Hack 1.0.3 to Microsoft C and MS-DOS, producing PC
  222. X! HACK 1.01e, added support for DEC Rainbow graphics in version 1.03g, and went
  223. X! on to produce at least four more versions (3.0, 3.2, 3.51, and 3.6).
  224. X  .pg
  225. X  \fBR. Black\fP ported PC HACK to Lattice C and the Atari 520/1040ST,
  226. X  producing ST Hack 1.03.
  227. X  .pg
  228. X  \fBMike Stephenson\fP merged these various versions back together,
  229. X! incorporating many of the added features, and produced NetHack 1.4.  He later
  230. X! coordinated a cast of thousands throughout the Usenet in adding and debugging
  231. X! features, and released NetHack versions 2.2 and 2.3.  Later, he coordinated a
  232. X! major rewrite of the game, heading a team which included Ken Arromdee,
  233. X! Jean-Christophe Collet, Steve Creps, Eric Hendrickson, Izchak Miller, John
  234. X! Rupley, Mike Threepoint, and Janet Walz, to produce NetHack 3.0.
  235. X  .pg
  236. X  \fBOlaf Siebert\fP ported NetHack 2.3 and 3.0 to the Amiga.
  237. X  .pg
  238. X! \fBEric R. Smith\fP ported NetHack 3.0 to the Atari.
  239. X! .pg
  240. X! The following folks have made significant contributions to the playability
  241. X! of the game:
  242. X  
  243. X  .sd
  244. X  .TS S
  245. X***************
  246. X*** 1126,1137 ****
  247. X  center;
  248. X  c c c.
  249. X  Tom Almy    Eric Hendrickson    Izchak Miller
  250. X! Ken Arromdee    Bruce Holloway    Gil Neiger
  251. X  Eric Backus    Richard P. Hughey    Eric S. Raymond
  252. X! John S. Bien    Greg Laskin    John Rupley
  253. X! Ralf Brown    Steve Linhart    Kevin Sweet
  254. X  Jean-Christophe Collet    Roland McGrath    Scott R. Turner
  255. X! Steve Creps    Bruce Mewborne    Janet Walz
  256. X  .TE
  257. X  .ed
  258. X  
  259. X--- 1127,1138 ----
  260. X  center;
  261. X  c c c.
  262. X  Tom Almy    Eric Hendrickson    Izchak Miller
  263. X! Ken Arromdee    Bruce Holloway        Gil Neiger
  264. X  Eric Backus    Richard P. Hughey    Eric S. Raymond
  265. X! John S. Bien    Greg Laskin        John Rupley
  266. X! Ralf Brown    Steve Linhart        Kevin Sweet
  267. X  Jean-Christophe Collet    Roland McGrath    Scott R. Turner
  268. X! Steve Creps    Bruce Mewborne        Janet Walz
  269. X  .TE
  270. X  .ed
  271. X  
  272. X*** auxil/Old/Makefile.auxil    Mon Jul 31 13:17:44 1989
  273. X--- auxil/Makefile.auxil    Mon Jul 31 09:27:34 1989
  274. X***************
  275. X*** 5,12 ****
  276. X  
  277. X  all:    Guidebook $(VARAUX) spec_levs
  278. X  
  279. X  Guidebook:    Guidebook.mn
  280. X!     nroff -mn Guidebook.mn > Guidebook
  281. X  
  282. X  data:    data.base ../include/config.h
  283. X      ( cd ../src ; ./makedefs -d )
  284. X--- 5,18 ----
  285. X  
  286. X  all:    Guidebook $(VARAUX) spec_levs
  287. X  
  288. X+ # The tmac.n macros come with the B news software, which should be available
  289. X+ # at your friendly local archive site if you don't already have it.
  290. X+ # An updated version also comes with the Elm mail distribution.
  291. X+ # They are used here because they are more widely available (if not more
  292. X+ # widely installed) than various proprietary macro packages that came with
  293. X+ # your machine but not your neighbor's.
  294. X  Guidebook:    Guidebook.mn
  295. X!     tbl Guidebook.mn | nroff -mn | col > Guidebook
  296. X  
  297. X  data:    data.base ../include/config.h
  298. X      ( cd ../src ; ./makedefs -d )
  299. X*** auxil/Old/data.base    Mon Jul 31 13:18:12 1989
  300. X--- auxil/data.base    Thu Jul 27 15:38:28 1989
  301. X***************
  302. X*** 105,111 ****
  303. X          this is to transform the human, over time, into an undead of
  304. X          great magical power.  A Lich  hates life in any form; even a
  305. X          touch from one of these  creatures will cause a numbing cold
  306. X!         in the victim.  They all posess the capability to use magic.
  307. X  m    a mimic
  308. X  n    a naga;
  309. X          The naga is a mystical creature with the body of a snake and
  310. X--- 105,111 ----
  311. X          this is to transform the human, over time, into an undead of
  312. X          great magical power.  A Lich  hates life in any form; even a
  313. X          touch from one of these  creatures will cause a numbing cold
  314. X!         in the victim.  They all possess the capability to use magic.
  315. X  m    a mimic
  316. X  n    a naga;
  317. X          The naga is a mystical creature with the body of a snake and
  318. X*** auxil/Old/history    Mon Jul 31 13:18:44 1989
  319. X--- auxil/history    Fri Jul 28 17:57:09 1989
  320. X***************
  321. X*** 4,17 ****
  322. X  Jay Fenlason wrote the original Hack with help from Kenny Woodland,
  323. X  Mike Thome, and Jon Payne.
  324. X  
  325. X! Andries Brouwer did a major re-write and published (at least) three versions
  326. X! (1.0.1, 1.0.2, and 1.0.3) for UNIX(tm) machines to the Usenet.
  327. X  
  328. X! Don Kneller ported 1.0.3 Hack to Microsoft(tm) C and MSDOS(tm), producing
  329. X! PC HACK 1.01e, added support for DEC Rainbow graphics in version 1.03g,
  330. X! and went on to produce at least four more versions (3.0, 3.2, 3.51, and 3.6).
  331. X  
  332. X! R. Black ported PC HACK 3.51 to Lattice(tm) C and the Atari 520/1040,
  333. X  producing ST Hack 1.03.
  334. X  
  335. X  Mike Stephenson merged these various versions back together, incorporating
  336. X--- 4,18 ----
  337. X  Jay Fenlason wrote the original Hack with help from Kenny Woodland,
  338. X  Mike Thome, and Jon Payne.
  339. X  
  340. X! Andries Brouwer did a major re-write, transforming Hack into a very different
  341. X! game, and published (at least) three versions (1.0.1, 1.0.2, and 1.0.3) for
  342. X! UNIX(tm) machines to the Usenet.
  343. X  
  344. X! Don G. Kneller ported Hack 1.0.3 to Microsoft(tm) C and MS-DOS(tm), producing
  345. X! PC HACK 1.01e, added support for DEC Rainbow graphics in version 1.03g, and
  346. X! went on to produce at least four more versions (3.0, 3.2, 3.51, and 3.6).
  347. X  
  348. X! R. Black ported PC HACK 3.51 to Lattice(tm) C and the Atari 520/1040ST,
  349. X  producing ST Hack 1.03.
  350. X  
  351. X  Mike Stephenson merged these various versions back together, incorporating
  352. X***************
  353. X*** 23,28 ****
  354. X--- 24,31 ----
  355. X  Threepoint, and Janet Walz, to produce NetHack 3.0. 
  356. X  
  357. X  Olaf Seibert ported NetHack 2.3 and 3.0 to the Amiga.
  358. X+ 
  359. X+ Eric R. Smith ported NetHack 3.0 to the Atari.
  360. X  
  361. X   
  362. X  From time to time, some depraved individual out there in netland sends a
  363. X*** auxil/Old/rumors.tru    Mon Jul 31 13:19:14 1989
  364. X--- auxil/rumors.tru    Mon Jul 24 14:47:51 1989
  365. X***************
  366. X*** 172,178 ****
  367. X  What is a cockatrice going to eat when it gets hungry?
  368. X  Where do you think all those demons come from?  From hell, of course.
  369. X  Where do you think hell is located?  It must be deep, deep down.
  370. X- Who would ever have thought one could live by eating fog clouds?
  371. X  Why do you suppose they call them MAGIC markers?
  372. X  Why would anybody in his sane mind engrave "Elbereth"?
  373. X  Wishing too much may bring you too little.
  374. X--- 172,177 ----
  375. X*** include/Old/config.h    Mon Jul 31 13:20:47 1989
  376. X--- include/config.h    Mon Jul 31 09:10:17 1989
  377. X***************
  378. X*** 27,32 ****
  379. X--- 27,35 ----
  380. X                 avoid overloading limited preprocessors */
  381. X  /* #define TERMINFO    /* uses terminfo rather than termcap */
  382. X              /* should be defined for most, but not all, SYSV */
  383. X+             /* in particular, it should NOT be defined for the
  384. X+              * UNIXPC unless you remove the use of the shared
  385. X+              * library in the makefile */
  386. X  /* #define MINIMAL_TERM    /* if a terminal handles highlighting or tabs poorly,
  387. X                 try this define, used in pager.c and termcap.c */
  388. X  #endif
  389. X***************
  390. X*** 47,52 ****
  391. X--- 50,65 ----
  392. X  #define    LOGFILE    "logfile" /* larger file for debugging purposes */
  393. X  #define    NEWS    "news"      /* the file containing the latest hack news */
  394. X  
  395. X+ /*
  396. X+  *    If COMPRESS is defined, it should contain the full path name of your
  397. X+  *    'compress' program.  Defining ZEROCOMP causes NetHack to do simpler
  398. X+  *    zero-run compression internally.  Both COMPRESS and ZEROCOMP create
  399. X+  *    smaller bones/level/save files, but require additional code and time.
  400. X+  */
  401. X+ 
  402. X+ #define COMPRESS "/usr/local/compress"
  403. X+ /* #define ZEROCOMP    /* Use only if COMPRESS is not used -- Olaf Seibert */
  404. X+ 
  405. X  
  406. X  #define    CHDIR        /* delete if no chdir() available */
  407. X  
  408. X***************
  409. X*** 148,157 ****
  410. X  #define    SHIRT        /* Hawaiian shirt code by Steve Linhart */
  411. X  #define THEOLOGY    /* Smarter gods - The Unknown Hacker */
  412. X  #define SINKS        /* Kitchen sinks - Janet Walz */
  413. X- #define COMPRESS "/usr/local/compress"    /* the location of 'compress' */
  414. X-             /* Compressed bones / save files - Izchak Miller */
  415. X- /* #define ZEROCOMP    /* Zero-run compression of files - Olaf Seibert */
  416. X-             /* Use only if COMPRESS is not used */
  417. X  #define SOUNDS        /* Add more life to the dungeon */
  418. X  #define REINCARNATION    /* Rogue-like levels */
  419. X  #define ELBERETH    /* Allow for disabling the E word - Mike 3point */
  420. X--- 161,166 ----
  421. X***************
  422. X*** 168,176 ****
  423. X  #define GOLEMS        /* Golems, by KAA */
  424. X  #define TOLKIEN        /* More varieties of objects and monsters */
  425. X  #define KICK        /* Allow kicking things besides doors -Izchak Miller */
  426. X  
  427. X  #ifdef REDO
  428. X! #define DOAGAIN    '\001'        /* The "redo" key Used in tty.c and cmd.c */
  429. X  #endif
  430. X  
  431. X  #define    EXP_ON_BOTL    /* Show experience on bottom line */
  432. X--- 177,186 ----
  433. X  #define GOLEMS        /* Golems, by KAA */
  434. X  #define TOLKIEN        /* More varieties of objects and monsters */
  435. X  #define KICK        /* Allow kicking things besides doors -Izchak Miller */
  436. X+ #define TUTTI_FRUTTI    /* Fruits as in Rogue, but which work... -KAA */
  437. X  
  438. X  #ifdef REDO
  439. X! #define DOAGAIN    '\001'        /* The "redo" key used in tty.c and cmd.c */
  440. X  #endif
  441. X  
  442. X  #define    EXP_ON_BOTL    /* Show experience on bottom line */
  443. X*** include/Old/decl.h    Mon Jul 31 13:21:37 1989
  444. X--- include/decl.h    Mon Jul 31 09:10:21 1989
  445. X***************
  446. X*** 51,59 ****
  447. X--- 51,61 ----
  448. X  E xchar fountsound, sinksound;    /* numbers of noisy things */
  449. X  
  450. X  E char pl_character[PL_CSIZ];
  451. X+ #ifdef TUTTI_FRUTTI
  452. X  E char pl_fruit[PL_FSIZ];
  453. X  E int current_fruit;
  454. X  E struct fruit *ffruit;
  455. X+ #endif
  456. X  #ifdef STRONGHOLD
  457. X  E char tune[6];
  458. X  #  ifdef MUSIC
  459. X***************
  460. X*** 98,106 ****
  461. X  E long moves;
  462. X  E long wailmsg;
  463. X  
  464. X- E boolean unweapon;
  465. X- E boolean stoned;
  466. X  E boolean in_mklev;
  467. X  #ifdef KOPS
  468. X  E boolean allow_kops;
  469. X  #endif
  470. X--- 100,110 ----
  471. X  E long moves;
  472. X  E long wailmsg;
  473. X  
  474. X  E boolean in_mklev;
  475. X+ E boolean stoned;
  476. X+ E boolean unweapon;
  477. X+ E boolean mrg_to_wielded;
  478. X+ 
  479. X  #ifdef KOPS
  480. X  E boolean allow_kops;
  481. X  #endif
  482. X*** include/Old/extern.h    Sun Jul 23 22:08:29 1989
  483. X--- include/extern.h    Mon Jul 31 21:56:47 1989
  484. X***************
  485. X*** 387,392
  486. X  E int doopen();
  487. X  E int doclose();
  488. X  
  489. X  /* ### makemon.c ### */
  490. X  
  491. X  E struct monst *makemon P((struct permonst *,int,int));
  492. X
  493. X--- 387,402 -----
  494. X  E int doopen();
  495. X  E int doclose();
  496. X  
  497. X+ /* ### mail.c ### */
  498. X+ 
  499. X+ #ifdef MAIL
  500. X+ #ifdef UNIX
  501. X+ E void getmailstatus();
  502. X+ #endif
  503. X+ E void ckmailstatus();
  504. X+ E void readmail();
  505. X+ #endif /* MAIL */
  506. X+ 
  507. X  /* ### makemon.c ### */
  508. X  
  509. X  E struct monst *makemon P((struct permonst *,int,int));
  510. X***************
  511. X*** 390,397
  512. X  /* ### makemon.c ### */
  513. X  
  514. X  E struct monst *makemon P((struct permonst *,int,int));
  515. X! E void enexto P((coord *,xchar,xchar));
  516. X! E int goodpos P((int,int));
  517. X  E void rloc P((struct monst *));
  518. X  E struct monst *mkmon_at P((char *,int,int));
  519. X  E void init_monstr();
  520. X
  521. X--- 400,407 -----
  522. X  /* ### makemon.c ### */
  523. X  
  524. X  E struct monst *makemon P((struct permonst *,int,int));
  525. X! E void enexto P((coord *,xchar,xchar,struct permonst *));
  526. X! E int goodpos P((int,int, struct permonst *));
  527. X  E void rloc P((struct monst *));
  528. X  E struct monst *mkmon_at P((char *,int,int));
  529. X  E void init_monstr();
  530. X***************
  531. X*** 638,643
  532. X  E int doset();
  533. X  E int dotogglepickup();
  534. X  E void option_help();
  535. X  E int fruitadd P((char *));
  536. X  
  537. X  /* ### pager.c ### */
  538. X
  539. X--- 648,654 -----
  540. X  E int doset();
  541. X  E int dotogglepickup();
  542. X  E void option_help();
  543. X+ #ifdef TUTTI_FRUTTI
  544. X  E int fruitadd P((char *));
  545. X  #endif
  546. X  
  547. X***************
  548. X*** 639,644
  549. X  E int dotogglepickup();
  550. X  E void option_help();
  551. X  E int fruitadd P((char *));
  552. X  
  553. X  /* ### pager.c ### */
  554. X  
  555. X
  556. X--- 650,656 -----
  557. X  E void option_help();
  558. X  #ifdef TUTTI_FRUTTI
  559. X  E int fruitadd P((char *));
  560. X+ #endif
  561. X  
  562. X  /* ### pager.c ### */
  563. X  
  564. X***************
  565. X*** 685,691
  566. X  /* ### pcunix.c ### */
  567. X  
  568. X  #ifdef MSDOS
  569. X! #ifndef TOS
  570. X  E void setrandom();
  571. X  E int getyear();
  572. X  E char *getdate();
  573. X
  574. X--- 697,703 -----
  575. X  /* ### pcunix.c ### */
  576. X  
  577. X  #ifdef MSDOS
  578. X! #ifndef OLD_TOS
  579. X  E void setrandom();
  580. X  E int getyear();
  581. X  E char *getdate();
  582. X***************
  583. X*** 748,753
  584. X  E void djinni_from_bottle P((struct obj *));
  585. X  E int monster_detect P((struct obj *));
  586. X  E int object_detect P((struct obj *));
  587. X  
  588. X  /* ### pray.c ### */
  589. X  
  590. X
  591. X--- 760,766 -----
  592. X  E void djinni_from_bottle P((struct obj *));
  593. X  E int monster_detect P((struct obj *));
  594. X  E int object_detect P((struct obj *));
  595. X+ E int trap_detect P((struct obj *));
  596. X  
  597. X  /* ### pray.c ### */
  598. X  
  599. X***************
  600. X*** 838,844
  601. X  E void do_mapping();
  602. X  E void do_vicinity_map();
  603. X  E int destroy_arm P((struct obj *));
  604. X- E int trap_detect P((struct obj *));
  605. X  E int gold_detect P((struct obj *));
  606. X  E int food_detect P((struct obj *));
  607. X  E void punish P((struct obj *));
  608. X
  609. X--- 851,856 -----
  610. X  E void do_mapping();
  611. X  E void do_vicinity_map();
  612. X  E int destroy_arm P((struct obj *));
  613. X  E int gold_detect P((struct obj *));
  614. X  E int food_detect P((struct obj *));
  615. X  E void punish P((struct obj *));
  616. X***************
  617. X*** 889,895
  618. X  E int hangup();
  619. X  #endif /* NOSAVEONHANGUP */
  620. X  E int dosave0();
  621. X! #if defined(DGK) && !defined(TOS)
  622. X  E boolean savelev P((int,xchar,int));
  623. X  E boolean swapin_file P((int));
  624. X  #else /* DGK && !TOS */
  625. X
  626. X--- 901,907 -----
  627. X  E int hangup();
  628. X  #endif /* NOSAVEONHANGUP */
  629. X  E int dosave0();
  630. X! #if defined(DGK) && !defined(OLD_TOS)
  631. X  E boolean savelev P((int,xchar,int));
  632. X  E boolean swapin_file P((int));
  633. X  #else /* DGK && !OLD_TOS */
  634. X***************
  635. X*** 892,898
  636. X  #if defined(DGK) && !defined(TOS)
  637. X  E boolean savelev P((int,xchar,int));
  638. X  E boolean swapin_file P((int));
  639. X! #else /* DGK && !TOS */
  640. X  E void savelev P((int, xchar));
  641. X  #endif /* DGK && !TOS */
  642. X  #ifdef ZEROCOMP
  643. X
  644. X--- 904,910 -----
  645. X  #if defined(DGK) && !defined(OLD_TOS)
  646. X  E boolean savelev P((int,xchar,int));
  647. X  E boolean swapin_file P((int));
  648. X! #else /* DGK && !OLD_TOS */
  649. X  E void savelev P((int, xchar));
  650. X  #endif /* DGK && !OLD_TOS */
  651. X  #ifdef ZEROCOMP
  652. X***************
  653. X*** 894,900
  654. X  E boolean swapin_file P((int));
  655. X  #else /* DGK && !TOS */
  656. X  E void savelev P((int, xchar));
  657. X! #endif /* DGK && !TOS */
  658. X  #ifdef ZEROCOMP
  659. X  E void bflush P((int));
  660. X  #endif
  661. X
  662. X--- 906,912 -----
  663. X  E boolean swapin_file P((int));
  664. X  #else /* DGK && !OLD_TOS */
  665. X  E void savelev P((int, xchar));
  666. X! #endif /* DGK && !OLD_TOS */
  667. X  #ifdef ZEROCOMP
  668. X  E void bflush P((int));
  669. X  #endif
  670. X***************
  671. X*** 899,904
  672. X  E void bflush P((int));
  673. X  #endif
  674. X  E void bwrite P((int,genericptr_t,unsigned int));
  675. X  E void savefruitchn P((int));
  676. X  
  677. X  /* ### search.c ### */
  678. X
  679. X--- 911,917 -----
  680. X  E void bflush P((int));
  681. X  #endif
  682. X  E void bwrite P((int,genericptr_t,unsigned int));
  683. X+ #ifdef TUTTI_FRUTTI
  684. X  E void savefruitchn P((int));
  685. X  #endif
  686. X  
  687. X***************
  688. X*** 900,905
  689. X  #endif
  690. X  E void bwrite P((int,genericptr_t,unsigned int));
  691. X  E void savefruitchn P((int));
  692. X  
  693. X  /* ### search.c ### */
  694. X  
  695. X
  696. X--- 913,919 -----
  697. X  E void bwrite P((int,genericptr_t,unsigned int));
  698. X  #ifdef TUTTI_FRUTTI
  699. X  E void savefruitchn P((int));
  700. X+ #endif
  701. X  
  702. X  /* ### search.c ### */
  703. X  
  704. X***************
  705. X*** 1087,1092
  706. X  E boolean special_case P((struct monst *));
  707. X  E boolean attack P((struct monst *));
  708. X  E boolean hmon P((struct monst *,struct obj *,int));
  709. X  
  710. X  /* ### unixmain.c ### */
  711. X  
  712. X
  713. X--- 1101,1107 -----
  714. X  E boolean special_case P((struct monst *));
  715. X  E boolean attack P((struct monst *));
  716. X  E boolean hmon P((struct monst *,struct obj *,int));
  717. X+ E int passive P((struct monst *,boolean,int));
  718. X  
  719. X  /* ### unixmain.c ### */
  720. X  
  721. X***************
  722. X*** 1122,1132
  723. X  E void gethdate P((char *));
  724. X  E int uptodate P((int));
  725. X  E void getlock();
  726. X- #ifdef MAIL
  727. X- E void getmailstatus();
  728. X- E void ckmailstatus();
  729. X- E void readmail();
  730. X- #endif /* MAIL */
  731. X  E void regularize P((char *));
  732. X  #endif /* UNIX */
  733. X  
  734. X
  735. X--- 1137,1142 -----
  736. X  E void gethdate P((char *));
  737. X  E int uptodate P((int));
  738. X  E void getlock();
  739. X  E void regularize P((char *));
  740. X  #endif /* UNIX */
  741. X  
  742. X***************
  743. X*** 1197,1203
  744. X  E void wormdead P((struct monst *));
  745. X  E void wormhit P((struct monst *));
  746. X  E void wormsee P((unsigned int));
  747. X! E void cutworm P((struct monst *,xchar,xchar,uchar));
  748. X  #endif /* WORM */
  749. X  
  750. X  /* ### worn.c ### */
  751. X
  752. X--- 1207,1213 -----
  753. X  E void wormdead P((struct monst *));
  754. X  E void wormhit P((struct monst *));
  755. X  E void wormsee P((unsigned int));
  756. X! E void cutworm P((struct monst *,xchar,xchar,unsigned));
  757. X  #endif /* WORM */
  758. X  
  759. X  /* ### worn.c ### */
  760. X*** include/Old/lev.h    Mon Jul 31 13:26:08 1989
  761. X--- include/lev.h    Fri Jul 28 17:54:31 1989
  762. X***************
  763. X*** 7,13 ****
  764. X  #ifndef LEV_H
  765. X  #define LEV_H
  766. X  
  767. X! #ifndef TOS
  768. X  #define OMASK    0
  769. X  #else
  770. X  #define msmsg    cprintf
  771. X--- 7,13 ----
  772. X  #ifndef LEV_H
  773. X  #define LEV_H
  774. X  
  775. X! #ifndef OLD_TOS
  776. X  #define OMASK    0
  777. X  #else
  778. X  #define msmsg    cprintf
  779. X*** include/Old/msdos.h    Mon Jul 31 13:29:15 1989
  780. X--- include/msdos.h    Fri Jul 28 17:54:36 1989
  781. X***************
  782. X*** 5,17 ****
  783. X  #ifndef MSDOS_H
  784. X  #define MSDOS_H
  785. X  
  786. X! #ifdef TOS
  787. X  #define msmsg    cprintf
  788. X  #endif
  789. X  extern const char *alllevels, *allbones;
  790. X  extern char levels[], bones[], permbones[], SAVEF[], hackdir[];
  791. X  extern int ramdisk;
  792. X! #if defined(DGK) && !defined(TOS)
  793. X  extern int count_only;
  794. X  #endif
  795. X  
  796. X--- 5,17 ----
  797. X  #ifndef MSDOS_H
  798. X  #define MSDOS_H
  799. X  
  800. X! #ifdef OLD_TOS
  801. X  #define msmsg    cprintf
  802. X  #endif
  803. X  extern const char *alllevels, *allbones;
  804. X  extern char levels[], bones[], permbones[], SAVEF[], hackdir[];
  805. X  extern int ramdisk;
  806. X! #if defined(DGK) && !defined(OLD_TOS)
  807. X  extern int count_only;
  808. X  #endif
  809. X  
  810. X*** include/Old/objclass.h    Mon Jul 31 13:29:54 1989
  811. X--- include/objclass.h    Mon Jul 24 19:01:39 1989
  812. X***************
  813. X*** 82,87 ****
  814. X--- 82,88 ----
  815. X   * pager.c:    if(q == '%') pline("%%    a piece of food");
  816. X   */
  817. X  
  818. X+ #ifdef TUTTI_FRUTTI
  819. X  struct fruit {
  820. X      char fname[PL_FSIZ];
  821. X      int fid;
  822. X***************
  823. X*** 88,91 ****
  824. X--- 89,93 ----
  825. X      struct fruit *nextf;
  826. X  };
  827. X  #define newfruit() (struct fruit *)alloc(sizeof(struct fruit))
  828. X+ #endif
  829. X  #endif /* OBJCLASS_H */
  830. X*** include/Old/patchlevel.h    Mon Jul 31 13:30:17 1989
  831. X--- include/patchlevel.h    Mon Jul 31 12:15:13 1989
  832. X***************
  833. X*** 1,1 ****
  834. X! #define PATCHLEVEL    0
  835. X--- 1,12 ----
  836. X! /*
  837. X!  *  Patch 1, July 31, 1989
  838. X!  *  add support for Atari TOS (courtesy Eric Smith) and Andrew File System
  839. X!  *    (courtesy Ralf Brown)
  840. X!  *  include the uuencoded version of termcap.arc for the MSDOS versions that
  841. X!  *    was included with 2.2 and 2.3
  842. X!  *  make a number of simple changes to accommodate various compilers
  843. X!  *  fix a handful of bugs, and do some code cleaning elsewhere
  844. X!  *  add more instructions for new environments and things commonly done wrong
  845. X!  */
  846. X! 
  847. X! #define PATCHLEVEL    1
  848. X*** include/Old/rm.h    Mon Jul 31 13:31:32 1989
  849. X--- include/rm.h    Fri Jul 28 17:54:41 1989
  850. X***************
  851. X*** 221,227 ****
  852. X  
  853. X  extern struct rm levl[COLNO][ROWNO];
  854. X  
  855. X! #if defined(DGK) && !defined(TOS)
  856. X  #define ACTIVE    1
  857. X  #define SWAPPED    2
  858. X  
  859. X--- 221,227 ----
  860. X  
  861. X  extern struct rm levl[COLNO][ROWNO];
  862. X  
  863. X! #if defined(DGK) && !defined(OLD_TOS)
  864. X  #define ACTIVE    1
  865. X  #define SWAPPED    2
  866. X  
  867. X*** include/Old/system.h    Mon Jul 31 13:32:31 1989
  868. X--- include/system.h    Fri Jul 28 17:54:46 1989
  869. X***************
  870. X*** 20,25 ****
  871. X--- 20,29 ----
  872. X  #define time_t long
  873. X  #endif
  874. X  
  875. X+ #if defined(TOS) && defined(__GNUC__)
  876. X+ #define _SIZE_T
  877. X+ #endif
  878. X+ 
  879. X  /* some old <sys/types.h> may not define off_t and size_t; if your system is
  880. X   * one of these, define them here
  881. X   */
  882. X***************
  883. X*** 155,161 ****
  884. X--- 159,167 ----
  885. X  #define OLD_SPRINTF
  886. X  E char *sprintf();
  887. X  #else
  888. X+ #ifndef TOS    /* problem with prototype mismatches with <stdio.h> */
  889. X  E int sprintf P((char *,const char *,...));
  890. X+ #endif
  891. X  #endif
  892. X  
  893. X  #define Sprintf    (void) sprintf
  894. X*** include/Old/tosconf.h    Mon Jul 31 13:32:55 1989
  895. X--- include/tosconf.h    Fri Jul 28 17:12:48 1989
  896. X***************
  897. X*** 8,14 ****
  898. X--- 8,27 ----
  899. X  
  900. X  #define MSDOS        /* must be defined to allow some inclusions */
  901. X  
  902. X+ /* NOTE: if your TOS compiler is dumb, #define OLD_TOS and compile with
  903. X+    oldtos.c to get a minimal configuration (you may need to do some
  904. X+    tweaking); otherwise (e.g. GCC) don't do it. OLD_TOS corresponds
  905. X+    most closely to LATTICE C, I think */
  906. X+ 
  907. X+ /* #define OLD_TOS */
  908. X+ /* #define NO_SIGNAL */
  909. X+ 
  910. X+ #ifdef __GNUC__
  911. X+ #define FCMASK    0666
  912. X+ #define O_BINARY 0
  913. X+ #else
  914. X  #define FCMASK    0x8000
  915. X+ #endif
  916. X  
  917. X  #ifdef UNIXDEBUG
  918. X  #define O_BINARY    0
  919. X***************
  920. X*** 15,25 ****
  921. X  #define remove(x)    unlink(x)
  922. X  #endif
  923. X  
  924. X  #define Rand() rand()
  925. X  #define Srand() srand()
  926. X  
  927. X! #include "msdos.h"
  928. X! #include "pcconf.h"        /* remainder of stuff is same as the PC */
  929. X  
  930. X  #endif /* TOSCONF_H /* */
  931. X  #endif /* TOS /* */
  932. X--- 28,48 ----
  933. X  #define remove(x)    unlink(x)
  934. X  #endif
  935. X  
  936. X+ #ifdef OLD_TOS
  937. X  #define Rand() rand()
  938. X  #define Srand() srand()
  939. X+ #endif
  940. X  
  941. X! #define DGK
  942. X! #define RANDOM
  943. X! #define SHELL
  944. X  
  945. X+ #ifndef MSDOS_H
  946. X+ #include "msdos.h"
  947. X+ #endif
  948. X+ #ifndef PCCONF_H
  949. X+ #include "pcconf.h"          /* remainder of stuff is same as the PC */
  950. X+ #endif
  951. X+ #undef ANSI_DEFAULT
  952. X  #endif /* TOSCONF_H /* */
  953. X  #endif /* TOS /* */
  954. X*** include/Old/tradstdc.h    Mon Jul 31 13:33:18 1989
  955. X--- include/tradstdc.h    Sat Jul 29 19:46:25 1989
  956. X***************
  957. X*** 62,65 ****
  958. X--- 62,69 ----
  959. X  
  960. X  #endif /* __STDC__ */
  961. X  
  962. X+ #ifdef __HC__    /* MetaWare High-C defaults to unsigned chars */
  963. X+ # undef signed
  964. X+ #endif
  965. X+ 
  966. X  #endif /* TRADSTDC_H /**/
  967. X*** include/Old/unixconf.h    Mon Jul 31 13:34:21 1989
  968. X--- include/unixconf.h    Mon Jul 31 09:10:03 1989
  969. X***************
  970. X*** 38,44 ****
  971. X--- 38,60 ----
  972. X  /* #define APOLLO    /* same for the Apollo */
  973. X  /* #define RANDOM    /* if neither random/srandom nor lrand48/srand48
  974. X                 is available from your system */
  975. X+ /* #define MICROPORT_286_BUG /* Changes needed in termcap.c to get it to
  976. X+                run with Microport Sys V/AT version 2.4.
  977. X+                By Jay Maynard */
  978. X  
  979. X+ 
  980. X+ /*
  981. X+  * The next two defines are intended mainly for the Andrew File System,
  982. X+  * which does not allow hard links.  If NO_FILE_LINKS is defined, lock files
  983. X+  * will be created in LOCKDIR using open() instead of in the playground using
  984. X+  * link().
  985. X+  *        Ralf Brown, 7/26/89 (from v2.3 hack of 10/10/88)
  986. X+  */
  987. X+ 
  988. X+ /* #define NO_FILE_LINKS    /* if no hard links */
  989. X+ /* #define LOCKDIR "/usr/games/lib/nethackdir"    /* where to put locks */
  990. X+ 
  991. X+ 
  992. X  /*
  993. X   * Define DEF_PAGER as your default pager, e.g. "/bin/cat" or "/usr/ucb/more"
  994. X   * If defined, it can be overridden by the environment variable PAGER.
  995. X***************
  996. X*** 113,118 ****
  997. X--- 129,142 ----
  998. X  #define Rand()    lrand48()
  999. X  #define Srand(seed) srand48(seed)
  1000. X  #endif
  1001. X+ 
  1002. X+ #ifdef hc    /* older versions of the MetaWare High-C compiler define this */
  1003. X+ # ifdef __HC__
  1004. X+ #  undef __HC__
  1005. X+ # endif __HC__
  1006. X+ # define __HC__ hc
  1007. X+ # undef hc
  1008. X+ #endif hc
  1009. X  
  1010. X  #include "extern.h"
  1011. X  
  1012. X*** others/Old/Makefile.pc    Mon Jul 31 13:36:38 1989
  1013. X--- others/Makefile.pc    Sun Jul 30 21:45:59 1989
  1014. X***************
  1015. X*** 47,56 ****
  1016. X  
  1017. X  VOBJ =    o\alloc.o o\apply.o o\artifact.o o\attrib.o o\bones.o o\cmd.o \
  1018. X      o\dbridge.o o\decl.o o\demon.o o\do.o o\do_name.o o\do_wear.o \
  1019. X!     o\dog.o o\dogmove.o o\dothrow.o o\eat.o o\end.o o\engrave.o \
  1020. X      o\exper.o o\extralev.o o\fountain.o o\getline.o o\hack.o o\invent.o \
  1021. X      o\lock.o o\mail.o o\main.o o\makemon.o o\mcastu.o o\mhitm.o o\mhitu.o \
  1022. X!     o\mklev.o o\mkmaze.o o\mkobj.o o\mkshop.o o\mon.o o\mondata.o \
  1023. X      o\msdos.o o\monmove.o o\monst.o o\mthrowu.o o\music.o o\o_init.o \
  1024. X      o\objects.o o\objnam.o o\options.o o\pager.o o\pickup.o o\polyself.o \
  1025. X      o\potion.o o\pray.o o\pri.o o\priest.o o\prisym.o $(RANDOM) o\read.o \
  1026. X--- 47,56 ----
  1027. X  
  1028. X  VOBJ =    o\alloc.o o\apply.o o\artifact.o o\attrib.o o\bones.o o\cmd.o \
  1029. X      o\dbridge.o o\decl.o o\demon.o o\do.o o\do_name.o o\do_wear.o \
  1030. X!     o\dog.o o\dogmove.o o\dokick.o o\dothrow.o o\eat.o o\end.o o\engrave.o \
  1031. X      o\exper.o o\extralev.o o\fountain.o o\getline.o o\hack.o o\invent.o \
  1032. X      o\lock.o o\mail.o o\main.o o\makemon.o o\mcastu.o o\mhitm.o o\mhitu.o \
  1033. X!     o\mklev.o o\mkmaze.o o\mkobj.o o\mkroom.o o\mon.o o\mondata.o \
  1034. X      o\msdos.o o\monmove.o o\monst.o o\mthrowu.o o\music.o o\o_init.o \
  1035. X      o\objects.o o\objnam.o o\options.o o\pager.o o\pickup.o o\polyself.o \
  1036. X      o\potion.o o\pray.o o\pri.o o\priest.o o\prisym.o $(RANDOM) o\read.o \
  1037. X*** others/Old/msdos.c    Mon Jul 31 13:38:36 1989
  1038. X--- others/msdos.c    Fri Jul 28 17:58:03 1989
  1039. X***************
  1040. X*** 3,11 ****
  1041. X  /* An assortment of MSDOS functions.
  1042. X   */
  1043. X  
  1044. X- #ifdef MSDOS
  1045. X- #include <dos.h>
  1046. X  #include "hack.h"
  1047. X  static char DOSgetch();
  1048. X  #ifdef DGK
  1049. X  static char BIOSgetch();
  1050. X--- 3,21 ----
  1051. X  /* An assortment of MSDOS functions.
  1052. X   */
  1053. X  
  1054. X  #include "hack.h"
  1055. X+ #ifdef MSDOS
  1056. X+ # ifdef TOS
  1057. X+ #  include <osbind.h>
  1058. X+ # else
  1059. X+ #  ifdef __TURBOC__    /* avoid incompatible redeclaration */
  1060. X+ #   define getdate quux
  1061. X+ #  endif
  1062. X+ #  include <dos.h>
  1063. X+ #  ifdef __TURBOC__
  1064. X+ #   undef getdate
  1065. X+ #  endif
  1066. X+ # endif
  1067. X  static char DOSgetch();
  1068. X  #ifdef DGK
  1069. X  static char BIOSgetch();
  1070. X***************
  1071. X*** 36,41 ****
  1072. X--- 46,54 ----
  1073. X  #define DIRECT_INPUT    0x7
  1074. X  static char
  1075. X  DOSgetch() {
  1076. X+ #ifdef TOS
  1077. X+     return (Crawcin() & 0x007f);
  1078. X+ #else
  1079. X      union REGS regs;
  1080. X  
  1081. X      regs.h.ah = DIRECT_INPUT;
  1082. X***************
  1083. X*** 46,51 ****
  1084. X--- 59,65 ----
  1085. X          regs.h.al = 0;        /* and return a 0 */
  1086. X      }
  1087. X      return (regs.h.al);
  1088. X+ #endif /* TOS */
  1089. X  }
  1090. X  
  1091. X  #include <ctype.h>
  1092. X***************
  1093. X*** 52,58 ****
  1094. X  #include <fcntl.h>
  1095. X  #include <process.h>
  1096. X  
  1097. X! static char *COMSPEC = "COMSPEC";
  1098. X  #define getcomspec() getenv(COMSPEC)
  1099. X  
  1100. X  #ifdef SHELL
  1101. X--- 66,78 ----
  1102. X  #include <fcntl.h>
  1103. X  #include <process.h>
  1104. X  
  1105. X! static char *COMSPEC = 
  1106. X! #ifdef TOS
  1107. X! "SHELL";
  1108. X! #else
  1109. X! "COMSPEC";
  1110. X! #endif
  1111. X! 
  1112. X  #define getcomspec() getenv(COMSPEC)
  1113. X  
  1114. X  #ifdef SHELL
  1115. X***************
  1116. X*** 77,83 ****
  1117. X--- 97,107 ----
  1118. X          start_screen();
  1119. X          docrt();
  1120. X      } else
  1121. X+ #ifdef TOS
  1122. X+         pline("Cannot find SHELL");
  1123. X+ #else
  1124. X          pline("Cannot exec COMMAND.COM");
  1125. X+ #endif
  1126. X      return 0;
  1127. X  }
  1128. X  #endif /* SHELL */
  1129. X***************
  1130. X*** 86,93 ****
  1131. X--- 110,123 ----
  1132. X  /* Normal characters are output when the shift key is not pushed.
  1133. X   * Shift characters are output when either shift key is pushed.
  1134. X   */
  1135. X+ #ifdef TOS
  1136. X+ #define KEYPADHI    113
  1137. X+ #define KEYPADLOW    103
  1138. X+ #else
  1139. X  #define KEYPADHI    83
  1140. X  #define KEYPADLOW    71
  1141. X+ #endif
  1142. X+ 
  1143. X  #define PADKEYS        (KEYPADHI - KEYPADLOW + 1)
  1144. X  #define iskeypad(x)    (KEYPADLOW <= (x) && (x) <= KEYPADHI)
  1145. X  static const struct pad {
  1146. X***************
  1147. X*** 96,106 ****
  1148. X--- 126,144 ----
  1149. X              {'y', 'Y'},        /* 7 */
  1150. X              {'k', 'K'},        /* 8 */
  1151. X              {'u', 'U'},        /* 9 */
  1152. X+ #ifndef TOS
  1153. X              {'m', CTRL('P')},    /* - */
  1154. X+ #endif
  1155. X              {'h', 'H'},        /* 4 */
  1156. X+ #ifdef TOS
  1157. X+             {'.', '.'},
  1158. X+ #else
  1159. X              {'g', 'g'},        /* 5 */
  1160. X+ #endif
  1161. X              {'l', 'L'},        /* 6 */
  1162. X+ #ifndef TOS
  1163. X              {'p', 'P'},        /* + */
  1164. X+ #endif
  1165. X              {'b', 'B'},        /* 1 */
  1166. X              {'j', 'J'},        /* 2 */
  1167. X              {'n', 'N'},        /* 3 */
  1168. X***************
  1169. X*** 110,120 ****
  1170. X--- 148,166 ----
  1171. X              {'7', '7'},        /* 7 */
  1172. X              {'8', '8'},        /* 8 */
  1173. X              {'9', '9'},        /* 9 */
  1174. X+ #ifndef TOS
  1175. X              {'m', CTRL('P')},    /* - */
  1176. X+ #endif
  1177. X              {'4', '4'},        /* 4 */
  1178. X+ #ifdef TOS
  1179. X+             {'.', '.'},        /* 5 */
  1180. X+ #else
  1181. X              {'g', 'G'},        /* 5 */
  1182. X+ #endif
  1183. X              {'6', '6'},        /* 6 */
  1184. X+ #ifndef TOS
  1185. X              {'p', 'P'},        /* + */
  1186. X+ #endif
  1187. X              {'1', '1'},        /* 1 */
  1188. X              {'2', '2'},        /* 2 */
  1189. X              {'3', '3'},        /* 3 */
  1190. X***************
  1191. X*** 125,131 ****
  1192. X  /* BIOSgetch gets keys directly with a BIOS call.
  1193. X   */
  1194. X  #define SHIFT        (0x1 | 0x2)
  1195. X! #define CTRL        0x4
  1196. X  /* #define ALT        0x8 */
  1197. X  #define KEYBRD_BIOS    0x16
  1198. X  
  1199. X--- 171,177 ----
  1200. X  /* BIOSgetch gets keys directly with a BIOS call.
  1201. X   */
  1202. X  #define SHIFT        (0x1 | 0x2)
  1203. X! /* #define CTRL        0x4 */
  1204. X  /* #define ALT        0x8 */
  1205. X  #define KEYBRD_BIOS    0x16
  1206. X  
  1207. X***************
  1208. X*** 132,160 ****
  1209. X  static char
  1210. X  BIOSgetch() {
  1211. X      unsigned char scan, shift, ch;
  1212. X      union REGS regs;
  1213. X      struct pad (*kpad)[PADKEYS];
  1214. X  
  1215. X      /* Get scan code.
  1216. X       */
  1217. X      regs.h.ah = 0;
  1218. X      int86(KEYBRD_BIOS, ®s, ®s);
  1219. X      ch = regs.h.al;
  1220. X      scan = regs.h.ah;
  1221. X! 
  1222. X      /* Get shift status.
  1223. X       */
  1224. X      regs.h.ah = 2;
  1225. X      int86(KEYBRD_BIOS, ®s, ®s);
  1226. X      shift = regs.h.al;
  1227. X! 
  1228. X      /* If scan code is for the keypad, translate it.
  1229. X       */
  1230. X      kpad = flags.num_pad ? numpad : keypad;
  1231. X      if (iskeypad(scan)) {
  1232. X          if (shift & SHIFT) {
  1233. X              flags.mv = flags.run = 1;
  1234. X              /* necessary if number_pad is on */
  1235. X              ch = (*kpad)[scan - KEYPADLOW].shift;
  1236. X          } else
  1237. X              ch = (*kpad)[scan - KEYPADLOW].normal;
  1238. X--- 178,220 ----
  1239. X  static char
  1240. X  BIOSgetch() {
  1241. X      unsigned char scan, shift, ch;
  1242. X+ #ifdef TOS
  1243. X+     long  x;
  1244. X+ #else
  1245. X      union REGS regs;
  1246. X+ #endif
  1247. X      struct pad (*kpad)[PADKEYS];
  1248. X  
  1249. X      /* Get scan code.
  1250. X       */
  1251. X+ #ifdef TOS
  1252. X+     x = Crawcin();
  1253. X+     ch = x & 0x0ff;
  1254. X+     scan = (x & 0x00ff0000L) >> 16;
  1255. X+ #else    
  1256. X      regs.h.ah = 0;
  1257. X      int86(KEYBRD_BIOS, ®s, ®s);
  1258. X      ch = regs.h.al;
  1259. X      scan = regs.h.ah;
  1260. X! #endif
  1261. X      /* Get shift status.
  1262. X       */
  1263. X+ #ifdef TOS
  1264. X+     shift = Kbshift(-1);
  1265. X+ #else
  1266. X      regs.h.ah = 2;
  1267. X      int86(KEYBRD_BIOS, ®s, ®s);
  1268. X      shift = regs.h.al;
  1269. X! #endif
  1270. X      /* If scan code is for the keypad, translate it.
  1271. X       */
  1272. X      kpad = flags.num_pad ? numpad : keypad;
  1273. X      if (iskeypad(scan)) {
  1274. X          if (shift & SHIFT) {
  1275. X+ #ifndef TOS
  1276. X              flags.mv = flags.run = 1;
  1277. X              /* necessary if number_pad is on */
  1278. X+ #endif
  1279. X              ch = (*kpad)[scan - KEYPADLOW].shift;
  1280. X          } else
  1281. X              ch = (*kpad)[scan - KEYPADLOW].normal;
  1282. X***************
  1283. X*** 162,167 ****
  1284. X--- 222,229 ----
  1285. X      return ch;
  1286. X  }
  1287. X  
  1288. X+ #ifndef TOS
  1289. X+ 
  1290. X  #define FINDFIRST    0x4E00
  1291. X  #define FINDNEXT    0x4F00
  1292. X  #define GETDTA        0x2F00
  1293. X***************
  1294. X*** 245,250 ****
  1295. X--- 307,349 ----
  1296. X      return ret;
  1297. X  }
  1298. X  
  1299. X+ #else /* TOS */
  1300. X+ 
  1301. X+ long
  1302. X+ freediskspace(path)
  1303. X+ char *path;
  1304. X+ {
  1305. X+     int drive = 0;
  1306. X+     struct {
  1307. X+         long freal; /*free allocation units*/
  1308. X+         long total; /*total number of allocation units*/
  1309. X+         long bps;   /*bytes per sector*/
  1310. X+         long pspal; /*physical sectors per allocation unit*/
  1311. X+     } freespace;
  1312. X+     if (path[0] && path[1] == ':')
  1313. X+         drive = (toupper(path[0]) - 'A') + 1;
  1314. X+     if (Dfree(&freespace,drive)<0) return -1;
  1315. X+     return freespace.freal*freespace.bps*freespace.pspal;
  1316. X+ }
  1317. X+ 
  1318. X+ static int
  1319. X+ findfirst(path)
  1320. X+ char *path;
  1321. X+ {
  1322. X+     return (Fsfirst(path, 0) == 0);
  1323. X+ }
  1324. X+ 
  1325. X+ static int findnext() {
  1326. X+     return (Fsnext() == 0);
  1327. X+ }
  1328. X+ 
  1329. X+ static char *
  1330. X+ getdta() {
  1331. X+     return (char *) Fgetdta();
  1332. X+ }
  1333. X+ 
  1334. X+ #endif /* TOS */
  1335. X+ 
  1336. X  long
  1337. X  filesize(file)
  1338. X  char *file;
  1339. X***************
  1340. X*** 283,289 ****
  1341. X      int status;
  1342. X      long fs;
  1343. X      extern saveprompt;
  1344. X! 
  1345. X      if (!ramdisk)
  1346. X          return;
  1347. X  
  1348. X--- 382,390 ----
  1349. X      int status;
  1350. X      long fs;
  1351. X      extern saveprompt;
  1352. X! #ifdef TOS
  1353. X!     extern int _copyfile();
  1354. X! #endif
  1355. X      if (!ramdisk)
  1356. X          return;
  1357. X  
  1358. X***************
  1359. X*** 293,304 ****
  1360. X      dta = getdta();
  1361. X      last[0] = '\0';
  1362. X      Sprintf(from, "%s%s", frompath, allbones);
  1363. X      if (findfirst(from))
  1364. X          do {
  1365. X              Strcpy(last, dta + 30);
  1366. X          } while (findnext());
  1367. X! 
  1368. X!     topath = (mode == TOPERM) ? permbones : levels;
  1369. X      if (last[0]) {
  1370. X          Sprintf(copy, "%cC copy", switchar());
  1371. X  
  1372. X--- 394,417 ----
  1373. X      dta = getdta();
  1374. X      last[0] = '\0';
  1375. X      Sprintf(from, "%s%s", frompath, allbones);
  1376. X+     topath = (mode == TOPERM) ? permbones : levels;
  1377. X+ #ifdef TOS
  1378. X+     eraseall(topath, allbones);
  1379. X+ #endif
  1380. X      if (findfirst(from))
  1381. X          do {
  1382. X+ #ifdef TOS
  1383. X+             Sprintf(from, "%s%s", frompath, dta+30); 
  1384. X+             Sprintf(to, "%s%s", topath, dta+30);
  1385. X+             if (_copyfile(from, to))
  1386. X+                 goto error_copying;
  1387. X+ #endif
  1388. X              Strcpy(last, dta + 30);
  1389. X          } while (findnext());
  1390. X! #ifdef TOS
  1391. X!     else
  1392. X!         return;
  1393. X! #else
  1394. X      if (last[0]) {
  1395. X          Sprintf(copy, "%cC copy", switchar());
  1396. X  
  1397. X***************
  1398. X*** 313,318 ****
  1399. X--- 426,432 ----
  1400. X              to, "> nul", NULL);
  1401. X      } else
  1402. X          return;
  1403. X+ #endif /* TOS */
  1404. X  
  1405. X      /* See if the last file got there.  If so, remove the ramdisk bones
  1406. X       * files.
  1407. X***************
  1408. X*** 324,329 ****
  1409. X--- 438,444 ----
  1410. X          return;
  1411. X      }
  1412. X  
  1413. X+ error_copying:
  1414. X      /* Last file didn't get there.
  1415. X       */
  1416. X      Sprintf(to, "%s%s", topath, allbones);
  1417. X***************
  1418. X*** 409,414 ****
  1419. X--- 524,532 ----
  1420. X      return FALSE;
  1421. X  }
  1422. X  
  1423. X+ #ifdef TOS
  1424. X+ #define comspec_exists() 1
  1425. X+ #else
  1426. X  /* Return 1 if the comspec was found */
  1427. X  static boolean
  1428. X  comspec_exists() {
  1429. X***************
  1430. X*** 422,427 ****
  1431. X--- 540,546 ----
  1432. X          }
  1433. X      return FALSE;
  1434. X  }
  1435. X+ #endif
  1436. X  
  1437. X  /* Prompt for game disk, then check for record file.
  1438. X   */
  1439. X***************
  1440. X*** 675,688 ****
  1441. X--- 794,813 ----
  1442. X  char *str;
  1443. X  {
  1444. X      char *ptr;
  1445. X+ #ifndef TOS
  1446. X      union REGS inregs;
  1447. X+ #endif
  1448. X      char drive;
  1449. X  
  1450. X      if ((ptr = index(str, ':')) != NULL) {
  1451. X          drive = toupper(*(ptr - 1));
  1452. X+ #ifdef TOS
  1453. X+         Dsetdrv(drive - 'A');
  1454. X+ #else
  1455. X          inregs.h.ah = SELECTDISK;
  1456. X          inregs.h.dl = drive - 'A';
  1457. X          intdos(&inregs, &inregs);
  1458. X+ #endif
  1459. X      }
  1460. X      return;
  1461. X  }
  1462. X***************
  1463. X*** 697,702 ****
  1464. X--- 822,828 ----
  1465. X  }
  1466. X  #endif
  1467. X  
  1468. X+ #ifndef TOS
  1469. X  /* Use the IOCTL DOS function call to change stdin and stdout to raw
  1470. X   * mode.  For stdin, this prevents MSDOS from trapping ^P, thus
  1471. X   * freeing us of ^P toggling 'echo to printer'.
  1472. X***************
  1473. X*** 754,764 ****
  1474. X--- 880,895 ----
  1475. X      intdos(®s, ®s);
  1476. X      return (regs.x.dx);
  1477. X  }
  1478. X+ #endif /* TOS */
  1479. X  
  1480. X  #ifdef DGK
  1481. X  /* Follow the PATH, trying to fopen the file.
  1482. X   */
  1483. X+ #ifdef TOS
  1484. X+ #define PATHSEP ','
  1485. X+ #else
  1486. X  #define PATHSEP    ';'
  1487. X+ #endif
  1488. X  
  1489. X  FILE *
  1490. X  fopenp(name, mode)
  1491. X***************
  1492. X*** 803,809 ****
  1493. X--- 934,942 ----
  1494. X  #endif
  1495. X  
  1496. X      flushout();
  1497. X+ #ifndef TOS
  1498. X      enable_ctrlP();        /* in case this wasn't done */
  1499. X+ #endif
  1500. X  #ifdef DGK
  1501. X      if (ramdisk) copybones(TOPERM);
  1502. X  #endif
  1503. X***************
  1504. X*** 811,817 ****
  1505. X--- 944,982 ----
  1506. X      chdir(orgdir);        /* chdir, not chdirx */
  1507. X      chdrive(orgdir);
  1508. X  #endif
  1509. X+ #ifdef TOS
  1510. X+     getreturn("to continue"); /* so the user can read the score list */
  1511. X+ #endif
  1512. X      exit(code);
  1513. X      return;
  1514. X  }
  1515. X  #endif /* MSDOS */
  1516. X+ 
  1517. X+ #ifdef TOS
  1518. X+ #define BIGBUF  8192
  1519. X+ 
  1520. X+ int
  1521. X+ _copyfile(from, to)
  1522. X+ {
  1523. X+     int fromfd, tofd, r;
  1524. X+     char *buf;
  1525. X+ 
  1526. X+     if ((fromfd = open(from, O_RDONLY|O_BINARY, 0)) < 0)
  1527. X+         return -1;
  1528. X+     if ((tofd = open(to, O_WRONLY|O_CREAT|O_TRUNC|O_BINARY, FCMASK)) < 0)
  1529. X+         return -1;
  1530. X+     if (!(buf = (char *)malloc((size_t)BIGBUF)))
  1531. X+         return -1;
  1532. X+     while ( (r = read(fromfd, buf, BIGBUF)) > 0)
  1533. X+         write(tofd, buf, r);
  1534. X+     close(fromfd);
  1535. X+     close(tofd);
  1536. X+     free(buf);
  1537. X+     return 0;    /* successful */
  1538. X+ }
  1539. X+ 
  1540. X+ int kbhit()
  1541. X+ {
  1542. X+     return Cconis();
  1543. X+ }
  1544. X+ #endif /* TOS */
  1545. X*** others/Old/oldtos.c    Mon Jul 31 13:39:38 1989
  1546. X--- others/oldtos.c    Mon Jul 31 12:10:02 1989
  1547. X***************
  1548. X*** 1,4 ****
  1549. X! /*    SCCS Id: @(#)tos.c    3.0    88/11/09
  1550. X   * An assortment of functions for the Atari with Lattice C compiler.
  1551. X   * Adapted from a similar set for MSDOS (written by Don Kneller) by
  1552. X   * R. Black (Louisville, CO).
  1553. X--- 1,4 ----
  1554. X! /*    SCCS Id: @(#)oldtos.c    3.0    88/11/09
  1555. X   * An assortment of functions for the Atari with Lattice C compiler.
  1556. X   * Adapted from a similar set for MSDOS (written by Don Kneller) by
  1557. X   * R. Black (Louisville, CO).
  1558. X***************
  1559. X*** 6,12 ****
  1560. X  /* NetHack may be freely redistributed.  See license for details. */
  1561. X  
  1562. X  #include "hack.h"
  1563. X- #include "osbind.h"
  1564. X  
  1565. X  extern int errno;
  1566. X  
  1567. X--- 6,11 ----
  1568. X*** others/Old/pcmain.c    Mon Jul 31 13:40:29 1989
  1569. X--- others/pcmain.c    Fri Jul 28 17:53:43 1989
  1570. X***************
  1571. X*** 3,14 ****
  1572. X  /* NetHack may be freely redistributed.  See license for details. */
  1573. X  /* main.c - (PC, TOS and AMIGA) version */
  1574. X  
  1575. X! #ifndef TOS
  1576. X  #include <signal.h>
  1577. X- #else
  1578. X- #define msmsg    cprintf
  1579. X  #endif
  1580. X- #include "hack.h"
  1581. X  
  1582. X  char orgdir[PATHLEN];
  1583. X  
  1584. X--- 3,12 ----
  1585. X  /* NetHack may be freely redistributed.  See license for details. */
  1586. X  /* main.c - (PC, TOS and AMIGA) version */
  1587. X  
  1588. X! #include "hack.h"
  1589. X! #ifndef NO_SIGNAL
  1590. X  #include <signal.h>
  1591. X  #endif
  1592. X  
  1593. X  char orgdir[PATHLEN];
  1594. X  
  1595. X***************
  1596. X*** 18,27 ****
  1597. X  int (*afternmv)(), (*occupation)();
  1598. X  static void moveloop();    /* a helper function for MSC optimizer */
  1599. X  
  1600. X! #if defined(DGK) && !defined(TOS)
  1601. X  struct finfo    zfinfo = ZFINFO;
  1602. X  int i;
  1603. X! #endif /* DGK && !TOS */
  1604. X  
  1605. X  char SAVEF[FILENAME];
  1606. X  char *hname = "NetHack";    /* used for syntax messages */
  1607. X--- 16,25 ----
  1608. X  int (*afternmv)(), (*occupation)();
  1609. X  static void moveloop();    /* a helper function for MSC optimizer */
  1610. X  
  1611. X! #if defined(DGK) && !defined(OLD_TOS)
  1612. X  struct finfo    zfinfo = ZFINFO;
  1613. X  int i;
  1614. X! #endif /* DGK && !OLD_TOS */
  1615. X  
  1616. X  char SAVEF[FILENAME];
  1617. X  char *hname = "NetHack";    /* used for syntax messages */
  1618. X***************
  1619. X*** 35,41 ****
  1620. X  extern unsigned char _osmajor;
  1621. X  #endif
  1622. X  
  1623. X! #ifdef TOS
  1624. X  #define OMASK    0x8000
  1625. X  #else
  1626. X  #define OMASK    0
  1627. X--- 33,43 ----
  1628. X  extern unsigned char _osmajor;
  1629. X  #endif
  1630. X  
  1631. X! #if defined(TOS) && defined(__GNUC__)
  1632. X! long _stksize = 16*1024;
  1633. X! #endif
  1634. X! 
  1635. X! #ifdef OLD_TOS
  1636. X  #define OMASK    0x8000
  1637. X  #else
  1638. X  #define OMASK    0
  1639. X***************
  1640. X*** 62,67 ****
  1641. X--- 64,74 ----
  1642. X       */
  1643. X      int (*funcp)();
  1644. X  
  1645. X+ #if defined(TOS) && defined(__GNUC__)
  1646. X+     extern int _unixmode;
  1647. X+     _unixmode = 0;
  1648. X+ #endif
  1649. X+ 
  1650. X  # ifdef __TURBOC__
  1651. X      if (_osmajor >= 3) hname = argv[0];    /* DOS 3.0+ */
  1652. X  # endif
  1653. X***************
  1654. X*** 72,78 ****
  1655. X      funcp = exit;    /* Kludge to get around LINT_ARGS of signal.
  1656. X               * This will produce a compiler warning, but that's OK.
  1657. X               */
  1658. X! # ifndef TOS
  1659. X      signal(SIGINT, (SIG_RET_TYPE) funcp);    /* restore original directory */
  1660. X  # endif
  1661. X  #endif /* AMIGA */
  1662. X--- 79,85 ----
  1663. X      funcp = exit;    /* Kludge to get around LINT_ARGS of signal.
  1664. X               * This will produce a compiler warning, but that's OK.
  1665. X               */
  1666. X! # ifndef NO_SIGNAL
  1667. X      signal(SIGINT, (SIG_RET_TYPE) funcp);    /* restore original directory */
  1668. X  # endif
  1669. X  #endif /* AMIGA */
  1670. X***************
  1671. X*** 85,95 ****
  1672. X          chdirx (dir, 1);
  1673. X  #endif
  1674. X      }
  1675. X! #if defined(DGK) && !defined(TOS)
  1676. X      /* zero "fileinfo" array to prevent crashes on level change */
  1677. X!     for (i = 0 ; i <= MAXLEVEL + 1; i++)
  1678. X          fileinfo[i] = zfinfo;
  1679. X! #endif /* DGK && !TOS */
  1680. X      initoptions();
  1681. X      if (!hackdir[0])
  1682. X          Strcpy(hackdir, orgdir);
  1683. X--- 92,103 ----
  1684. X          chdirx (dir, 1);
  1685. X  #endif
  1686. X      }
  1687. X! #if defined(DGK) && !defined(OLD_TOS)
  1688. X      /* zero "fileinfo" array to prevent crashes on level change */
  1689. X!     for (i = 0 ; i <= MAXLEVEL; i++) {
  1690. X          fileinfo[i] = zfinfo;
  1691. X!     }
  1692. X! #endif /* DGK && !OLD_TOS */
  1693. X      initoptions();
  1694. X      if (!hackdir[0])
  1695. X          Strcpy(hackdir, orgdir);
  1696. X***************
  1697. X*** 141,147 ****
  1698. X      cls();
  1699. X      u.uhp = 1;    /* prevent RIP on early quits */
  1700. X      u.ux = FAR;    /* prevent nscr() */
  1701. X! #ifndef TOS
  1702. X      /*
  1703. X       * We cannot do chdir earlier, otherwise gethdate will fail.
  1704. X       */
  1705. X--- 149,155 ----
  1706. X      cls();
  1707. X      u.uhp = 1;    /* prevent RIP on early quits */
  1708. X      u.ux = FAR;    /* prevent nscr() */
  1709. X! #ifndef OLD_TOS
  1710. X      /*
  1711. X       * We cannot do chdir earlier, otherwise gethdate will fail.
  1712. X       */
  1713. X***************
  1714. X*** 255,261 ****
  1715. X  #endif /* DGK */
  1716. X          ((fd = open(SAVEF, OMASK)) >= 0) &&
  1717. X          (uptodate(fd) || !unlink(SAVEF))) {
  1718. X! #ifndef TOS
  1719. X          (void) signal(SIGINT, (SIG_RET_TYPE) done1);
  1720. X  #endif
  1721. X          pline("Restoring old save file...");
  1722. X--- 263,269 ----
  1723. X  #endif /* DGK */
  1724. X          ((fd = open(SAVEF, OMASK)) >= 0) &&
  1725. X          (uptodate(fd) || !unlink(SAVEF))) {
  1726. X! #ifndef NO_SIGNAL
  1727. X          (void) signal(SIGINT, (SIG_RET_TYPE) done1);
  1728. X  #endif
  1729. X          pline("Restoring old save file...");
  1730. X***************
  1731. X*** 286,292 ****
  1732. X          flags.ident = 1;
  1733. X          init_objects();
  1734. X          u_init();
  1735. X! #ifndef TOS
  1736. X          (void) signal(SIGINT, (SIG_RET_TYPE) done1);
  1737. X  #endif
  1738. X          mklev();
  1739. X--- 294,300 ----
  1740. X          flags.ident = 1;
  1741. X          init_objects();
  1742. X          u_init();
  1743. X! #ifndef NO_SIGNAL
  1744. X          (void) signal(SIGINT, (SIG_RET_TYPE) done1);
  1745. X  #endif
  1746. X          mklev();
  1747. X***************
  1748. X*** 323,329 ****
  1749. X      }
  1750. X  
  1751. X      initrack();
  1752. X! #ifndef TOS
  1753. X      (void) signal(SIGINT, SIG_IGN);
  1754. X  #endif
  1755. X      /* Help for Microsoft optimizer.  Otherwise main is too large -dgk*/
  1756. X--- 331,337 ----
  1757. X      }
  1758. X  
  1759. X      initrack();
  1760. X! #ifndef NO_SIGNAL
  1761. X      (void) signal(SIGINT, SIG_IGN);
  1762. X  #endif
  1763. X      /* Help for Microsoft optimizer.  Otherwise main is too large -dgk*/
  1764. X*** others/Old/pcunix.c    Mon Jul 31 13:41:26 1989
  1765. X--- others/pcunix.c    Fri Jul 28 17:54:01 1989
  1766. X***************
  1767. X*** 15,21 ****
  1768. X  
  1769. X  #include "hack.h"    /* mainly for index() which depends on BSD */
  1770. X  #ifdef TOS
  1771. X! #ifdef UNIXDEBUG
  1772. X  #include <errno.h>
  1773. X  #else
  1774. X  #include <error.h>
  1775. X--- 15,21 ----
  1776. X  
  1777. X  #include "hack.h"    /* mainly for index() which depends on BSD */
  1778. X  #ifdef TOS
  1779. X! #ifndef OLD_TOS
  1780. X  #include <errno.h>
  1781. X  #else
  1782. X  #include <error.h>
  1783. X***************
  1784. X*** 25,31 ****
  1785. X  #include    <sys/types.h>
  1786. X  #include    <sys/stat.h>
  1787. X  
  1788. X! #ifndef TOS
  1789. X  static struct stat buf, hbuf;
  1790. X  void
  1791. X  setrandom()
  1792. X--- 25,31 ----
  1793. X  #include    <sys/types.h>
  1794. X  #include    <sys/stat.h>
  1795. X  
  1796. X! #ifndef OLD_TOS
  1797. X  static struct stat buf, hbuf;
  1798. X  void
  1799. X  setrandom()
  1800. X***************
  1801. X*** 95,100 ****
  1802. X--- 95,101 ----
  1803. X  gethdate(name)
  1804. X  char *name;
  1805. X  {
  1806. X+ #if defined(TOS) && !defined(__GNUC__)
  1807. X  /* old version - for people short of space */
  1808. X  /*
  1809. X  /* register char *np;
  1810. X***************
  1811. X*** 134,143 ****
  1812. X--- 135,146 ----
  1813. X      path = np + 1;
  1814. X      }
  1815. X      error("Cannot get status of %s.", (np = rindex(name, '/')) ? np+1 : name);
  1816. X+ #endif /* TOS && __GNUC__ */
  1817. X  }
  1818. X  
  1819. X  int
  1820. X  uptodate(fd) {
  1821. X+ #if defined(TOS) && !defined(__GNUC__) /* no fstat yet */
  1822. X      if(fstat(fd, &buf)) {
  1823. X      pline("Cannot get status of saved level? ");
  1824. X      return(0);
  1825. X***************
  1826. X*** 146,154 ****
  1827. X      pline("Saved level is out of date. ");
  1828. X      return(0);
  1829. X      }
  1830. X      return(1);
  1831. X  }
  1832. X! #endif /* TOS /* */
  1833. X  
  1834. X  void
  1835. X  regularize(s)    /* normalize file name - we don't like .'s, /'s, spaces */
  1836. X--- 149,158 ----
  1837. X      pline("Saved level is out of date. ");
  1838. X      return(0);
  1839. X      }
  1840. X+ #endif
  1841. X      return(1);
  1842. X  }
  1843. X! #endif /* MIN_TOS /* */
  1844. X  
  1845. X  void
  1846. X  regularize(s)    /* normalize file name - we don't like .'s, /'s, spaces */
  1847. END_OF_FILE
  1848. if test 47044 -ne `wc -c <'misc.diff'`; then
  1849.     echo shar: \"'misc.diff'\" unpacked with wrong size!
  1850. fi
  1851. # end of 'misc.diff'
  1852. fi
  1853. echo shar: End of archive 2 \(of 6\).
  1854. cp /dev/null ark2isdone
  1855. MISSING=""
  1856. for I in 1 2 3 4 5 6 ; do
  1857.     if test ! -f ark${I}isdone ; then
  1858.     MISSING="${MISSING} ${I}"
  1859.     fi
  1860. done
  1861. if test "${MISSING}" = "" ; then
  1862.     echo You have unpacked all 6 archives.
  1863.     echo "now type ./do_patch.sh"
  1864.     rm -f ark[1-9]isdone
  1865. else
  1866.     echo You still need to unpack the following archives:
  1867.     echo "        " ${MISSING}
  1868. fi
  1869. ##  End of shell archive.
  1870. exit 0
  1871.